#ifndef pgn_h
#define pgn_h


#include <stdio.h>

// forward declaration
struct game_t;


/*
 * Dump g in PGN format.
 *
 * The moves of g are printed to f in the PGN format.  Note that tags
 * are not generated (not even when the game does not start from the
 * standard position).
 */
int pgn_print(FILE* f, const struct game_t* g);


/*
 * Parse the next game in f.
 *
 * The resulting game is stored in g.  Returns 1 if a game has been
 * succesfully loaded, 0 if no game is found (the end of file has been
 * reached), -1 in case of error.
 */
int pgn_read(FILE* f, struct game_t* g);

#endif  // pgn_h
